package com.wzy.portfolio.controller;


import com.wzy.portfolio.service.FundService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Tag(name = "基金分析", description = "基金分析")
@RestController
@RequestMapping("/fund")
public class FundParseController {

    @Autowired
    FundService fundService;

    @PostMapping("/base/info")
    @Operation(summary = "所有基金入库", description = "所有基金入库")
    public void addFundBaseInfo(){
        fundService.addFundBaseInfo();
    }

    @GetMapping("/history")
    @Operation(summary = "入库日期范围基金涨跌幅", description = "入库日期范围基金涨跌幅")
    public void fundHistory(@RequestParam String startDate,@RequestParam String endDate){
        fundService.fundHistoryeByEastmoney(startDate,endDate);
    }

}
